package com.digiregistry.api.wrapper.model;

import java.io.Serializable;

import com.digiregistry.api.util.Digest;

public class FileTimestamp implements Serializable {

	private String provider;
	private HashAlgorithm algorithm;
	private String value;
	private byte[] tsBytes;

	public FileTimestamp(String provider, HashAlgorithm algorithm, String value) {
		this.provider = provider;
		this.algorithm = algorithm;
		this.value = value;
		this.tsBytes = Digest.fromHex(value);
	}
	
	public String getProvider() {
		return provider;
	}
	public String getValue() {
		return value;
	}
	
	public byte[] getTimestampBytes() {
		return tsBytes;
	}

	public HashAlgorithm getAlgorithm() {
		return algorithm;
	}
	
}
